<%--
  @desc: 应用列表首页
  @author: chenw
  @create: 2014-4-29 下午 15:32
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);" action="<c:url value='/sys/app/list'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left;line-height: 25px;">
                    <label style="width:60px;">应用名称：</label>
                    <input name="keywords" type="text" value="${query.keywords}" placeholder="请输入关键字检索"
                           style="width:250px;font-family:'微软雅黑 sans-serif serif';"/>
                </li>
                <li>
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>--%>
<div class="pageContent" style="padding-top: 1px;">
    <div class="panelBar">
        <ul class="toolBar">
            <%--<li><a href="<c:url value='/sys/app/view/0'/>" target="navTab" class="add" rel="page_app_add" title="新增应用"><span>新增</span></a></li>--%>
            <%--<li><a href="<c:url value='/sys/app/del/{sel_id}'/>" target="ajaxDel" class="delete" title="确定要删除吗?"><span>删除</span></a></li>--%>
            <%--<li><a href="<c:url value='/sys/app/view/{sel_id}'/>" target="navTab" class="edit" title="编辑应用"><span>编辑</span></a></li>--%>
            <%--<li class="line">line</li>--%>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="115">
        <thead>
        <tr>
            <th width="40" align="center">序号</th>
            <th width="80">应用名称</th>
            <th width="80">类型</th>
            <th width="120">地址</th>
            <th width="80">状态</th>
            <th width="80">访问权限</th>
            <th width="40" orderField="sort" <c:if
                test='${query.orderField eq "sort" }'> class="${query.orderDirection}"</c:if>>排序
        </th>

        </tr>
        </thead>
        <tbody>
        <c:forEach var="app" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" rel="${app.id}">
                <td>${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
                <td>${app.title}</td>
                <td>${2 == app.appType ?'HTML5':(1== app.appType ?'原生':'第三方平台')}</td>
                <td>${app.startPage}</td>
                <td>${1 == app.status ?'正常':(2== app.status ?'审核':'禁用')}</td>
                <td>${0 == app.power ?'无需登录':(1== app.power ?'仅登录':'需实名')} </td>
                <td>${app.sort}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
             pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/sys/app/list'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="keywords" value="${query.keywords}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="orderField" value="${query.orderField}"/>
        <input type="hidden" name="orderDirection" value="${query.orderDirection}"/>
    </form>
</div>
